var params = {};
var path="LanJuPublic";
var ponitLog=({
getWindowsParam :function (){
		var br={  
			    versions:function(){   
			           var u = navigator.userAgent, app = navigator.appVersion;   
			           return {//移动终端浏览器版本信息   
			                trident: u.indexOf('Trident') > -1, //IE内核  
			                presto: u.indexOf('Presto') > -1, //opera内核  
			                webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核  
			                gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核  
			                mobile: !!u.match(/AppleWebKit.*Mobile.*/)||!!u.match(/AppleWebKit/), //是否为移动终端  
			                ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端  
			                android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器  
			                iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器  
			                iPad: u.indexOf('iPad') > -1, //是否iPad  
			                webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部  
			            };  
			         }(),  
			         language:(navigator.browserLanguage || navigator.language).toLowerCase(),
			         getScript :function(){
			        	 var script = document.createElement("script");
			        	    script.type = "text/javascript";
			        	    script.src = "";
			        	    document.getElementsByTagName('body')[0].appendChild(script);
			         }
			         
			};
		   //根据参数名获取参数值
		function getVal(name) {
			var uri = window.location.search; 
			var re = new RegExp("" +name+ "\=([^\&\?]*)", "ig"); 
			return ((uri.match(re))?(uri.match(re)[0].substr(name.length+1)):"");
		}
	    //Document对象数据
	    if(document) {
	    	
	        params.domain = document.domain || ''; 
//	        params.url =document.URL || ''; 
	        params.title = document.title || ''; 
	        params.refer = document.referrer || ''; 
	    }   
	    //Window对象数据
	    if(window && window.screen) {
	    	
	        params.sh = window.screen.height || 0;
	        params.sw = window.screen.width || 0;
	        params.sc = params.sw+"*"+params.sh;
	        params.cd = window.screen.colorDepth || 0;
	    }   
	    //navigator对象数据
	    if(navigator) {
	        params.lang = navigator.language || ''; 
	        params.br =navigator.appName;
	        params.bv = navigator.appVersion;
	        params.bc = navigator.appCodeName;
	        params.os=navigator.platform ;//操作系统
	        params.ua=navigator.userAgent;
	        
	    }   
//	    params.chId = getVal("ch");
	    params.pin="";
	    var arr,reg=new RegExp("(^| )pin=([^;]*)(;|$)");
	    if(arr=document.cookie.match(reg)){
	    	params.pin = unescape(arr[2]);
	    }
	    params.ac="";
	    params.chnlCode=localStorage.getIte
//	    params.account = m("chnl");//获取名称为“key”的值
	    params.url =  window.location.href;
	    var ar,re=new RegExp("(^| )ac=([^;]*)(;|$)");
	    if(ar=document.cookie.match(re)){
	    	params.ac = unescape(ar[2]);
	    }
	    //拼接参数串
	    var args = ''; 
	    for(var i in params) {
	        if(args != '') {
	            args += '&';
	        }   
	        args += i + '=' + encodeURIComponent(params[i]);
	    }
	    var data={
	    		"url": params.url,
	    		"domain" : params.domain,
	    		"ip" : returnCitySN["cip"]
	    }
	    $.ajax({
			type : "POST",
			dataType : 'json',
			url : "http://lanjushiye.com.cn/LanJuPublic/logs/insertLogs.do",
			data : data,
			success : function(data) {
				if(data.success){
					console.log("记录成功");
				}
			}
		});
	    return args;
	},
})